package de.general;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;

public class Eeg03FlujoTexto {

	public static void main(String[] args) {
		File f = new File("C:/scjp6.txt");

	    File f2 = new File("C:/copia.txt");

	    FileInputStream is=null;

	    InputStreamReader isr=null;

	    BufferedReader br=null;

	    PrintWriter pw=null;

	    try {

	      is = new FileInputStream(f);

	      isr = new InputStreamReader(is);

	      br = new BufferedReader(isr);

	      String s = br.readLine();

	      pw = new PrintWriter(f2);

	 

	      do {

	        System.out.println(s);

	        pw.println(s);

	      }

	      while ( (s = br.readLine()) != null);

	    }

	    catch (IOException ex) {

	      System.out.println("Error durante el proceso de copia");

	    }
	    
	}

}
